package clue.board;

import java.util.ArrayList;

import clue.enums.Room;

/**
 *
 * @author Shawn
 */
public class Square {
  public enum SquareType {
    REGULAR,
    ROOM,
  }
  
  public final int x, y;
  public boolean lt = false;
  public boolean rt = false;
  public boolean tp = false;
  public boolean bm = false;
  public SquareType type;
  public Room room = null;
  
  public ArrayList<Square> neighbors = new ArrayList<>();
  
  public Square(int x, int y, String c) {
	  this.x = x;
	  this.y = y;
	  int bits = Integer.parseInt(c, 16);
	  if ((bits & 0x1) != 0)
		  lt = true;
	  if ((bits & 0x2) != 0)
		  bm = true;
	  if ((bits & 0x4) != 0)
		  rt = true;
	  if ((bits & 0x8) != 0)
		  tp = true;
  }
  
  public String toString() {
	  return "(" + x + "," + y + ")";
  }
}
